import { LoadingOutlined } from "@ant-design/icons";


export default function Button({children, loading = false, disabled = false, className = '', onClick}: {
    children: React.ReactNode;
    loading?: boolean;
    disabled?: boolean;
    className?: string;
    onClick?: () => void;
}) {

    return <button className={`${className} ${disabled ? 'opacity-50' : ''}`} disabled={disabled} onClick={onClick}>
        {
            loading
                ? <LoadingOutlined />
                : children
        }
    </button>
}